﻿using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;

namespace BPM.Web.Shared.Data;

/// <summary>
/// 角色数据范围表
/// </summary>
[DisplayName("角色数据范围表")]
public class SysRoleDataScope : BaseVM
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [DisplayName("业务号")]
    [Required(ErrorMessage = "业务号不能为空")]
    [JsonPropertyName("id")]
    public long Id { get; set; }

    /// <summary>
    /// 角色Id
    /// </summary>
    [DisplayName("角色Id")]
    public long SysRoleId { get; set; }

    /// <summary>
    /// 一对一引用（系统角色）
    /// </summary>
    public SysRole SysRole { get; set; } = new();

    /// <summary>
    /// 机构Id
    /// </summary>
    [DisplayName("机构Id")]
    public long SysOrgId { get; set; }

    /// <summary>
    /// 一对一引用（系统机构）
    /// </summary>
    public SysOrg SysOrg { get; set; } = new();
}
